-- CALC_ELEMENT_BALL_RANK

-- 获取元素套合成装备的等级
-- @param classId       物品id
return function(classId)
    -- 每个元素套对应其合成的装备
    local suitMap = {
        [5259] = 11,
        [5260] = 12,
        [5261] = 13,
        [5262] = 14,
        [5263] = 15,
        [5264] = 16,
    }

    local rank = 4;
    if suitMap[classId] ~= nil and suitMap[classId] > 0 then
        local prop = PropM.combine(ME.user, "talent_suit", suitMap[classId]);
        if prop[3] > 0 then
            rank = math.max(rank, prop[3] + 2);
        end
    end

    return math.min(rank, 7);
end
